package cn.intertion.dao;


import cn.intertion.model.Operator;
import cn.intertion.model.OperatorExten;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2018-12-19
 */

@Repository
public interface OperatorMapper extends BaseMapper<Operator> {

    int updateOpenId(@Param("openid") String openid, @Param("uid") String uid);

    List<OperatorExten> getUsersToNotify();

    List<Operator> selectByMobile(@Param("mobile") String mobile);

    List<Operator> selectByOpenid(@Param("openid") String openid);

    List<Operator> checkUser(@Param("name") String mobile, @Param("pswd") String pswd);


    List<OperatorExten> getUsersToNotify2(String wechatStatus);

    void updateNotifyId(@Param("uid")String operatorId,@Param("maxid") Long maxlastid);

    Integer selectIdSeq();

    void updateOpenidById(@Param("openid")String openid, @Param("vtoken")String token, @Param("tokentime")Date date, @Param("id")String id);
}
